import React, {FC} from 'react';
import "./index.less";
import classNames from "classnames";

interface HxJournalSectionProps {
    title: React.ReactNode;
    children?: React.ReactNode;
    onClick?: () => void;
    className?: string;
}

const HxJournalSection: FC<HxJournalSectionProps> = (props) => {
    return (
        <div className={classNames("hx-journal-section-container",props.className,{"hx-journal-section-clickable":props.onClick})}
             onClick={props.onClick}>
            <div className={"hx-journal-section-title"}>{props.title}</div>
            <div className={"hx-journal-section-content"}>{props.children}</div>
        </div>
    );
};

export default HxJournalSection;
